Skip to content

feat: add ft api-keys create|list|revoke - #30

Merged
lu-ochenty merged 1 commit into
mainfrom
feat/api-keys-command
Jul 16, 2026
Merged

feat: add ft api-keys create|list|revoke#30
lu-ochenty merged 1 commit into
mainfrom
feat/api-keys-command

Conversation

@LucasLeguizamo

Copy link
Copy Markdown
Contributor

Comando de CLI para gestionar API keys de servicio self-service, mitad cliente del backend #285 (contrato /api/v1 v1.5.0).

Subcomandos

  • ft api-keys create <name> [--scope read|write] [--expires <iso>] — mintea una key e imprime el secreto en claro una sola vez con advertencia (o --json para el objeto completo). Default --scope read.
  • ft api-keys list [--all --csv --columns --limit --cursor] — tabla paginada (name, keyPrefix, scope, lastUsedAt, expiresAt, revokedAt); nunca devuelve el secreto.
  • ft api-keys revoke <id> [--yes] — DELETE con confirmación.

Todos comparten --workspace como el resto del CLI.

Detalle

  • SDK regenerado (pnpm generate) desde openapi.json v1.5.0. Funciones consumidas: postApiKeys, getApiKeys, deleteApiKeysId.
  • Comando dedicado (no registerResource) por la UX especial de create (secreto mostrado una vez) y revoke.
  • Incluye changeset (minor) y test estructural del comando.
  • pnpm typecheck / pnpm lint / pnpm test en verde.

🤖 Generated with Claude Code

Self-service management of service API keys against the /api/v1 endpoints
added in backend #285 (contract v1.5.0):

- create <name> [--scope read|write] [--expires <iso>]: mints a key and prints
  the plaintext secret exactly once with a warning.
- list: paginated table (never returns the secret), --all/--csv/--columns.
- revoke <id>: DELETE with confirmation unless --yes.

Regenerated the SDK from the updated openapi.json (v1.5.0). Includes a
changeset (minor) and a structural command test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@lu-ochenty
lu-ochenty merged commit 2754187 into main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants